<?	
	/* Se asegura que el archivo es incluido por el index */
	defined( 'LOAD_MODULE_ACTION' ) or die( 'No esta permitido el acceso directo a ' . __FILE__ );  
		$this->oTmpObject = new Home_frm( $this );
	
	class Home_frm extends Frm
	{
	function setValue ( $ncHome )
		{
			$cSql = "SELECT  cdHome,  nqFilas,  nqColumnas,  nWidth,  nHeight,  nPadding
				FROM gtHome
				WHERE ncHome = '$ncHome' ";
			$aDatos = $this->oDatabase->getArray($cSql);	
			$this->setFieldsArray ( $aDatos );
		}
	function Home_frm( &$oModule )
		{
			$this->Frm( $oModule );
			//Crea los Objetos de los campos de edicion
			$this->aFields['ncHome']				= new InputNumber( "ncHome" );
			$this->aFields['cdHome']				= new InputText( "cdHome" );
			$this->aFields['nqFilas']				= new InputNumber( "nqFilas" );
			$this->aFields['nqColumnas']				= new InputNumber( "nqColumnas" );
			$this->aFields['nWidth']				= new InputNumber( "nWidth" );
			$this->aFields['nHeight']				= new InputNumber( "nHeight" );
			$this->aFields['nPadding']				= new InputNumber( "nPadding" );	
		}	
	function setLevel( $nLevel)
		{
			switch ( $nLevel )
			{
				case 1: 
					$this->aInput = array ('ncHome' );
					break;
				case 2: 
					$this->aInput = array ('ncHome','cdHome','nqFilas','nqColumnas','nWidth','nHeight','nPadding' );
					break;
			}
		}
	function initializeForm()
		{
			// Si viene el Ubicacion hace el retrieve
				if ( $this->isRetrievable() && $this->aFields['ncHome']->getValue() )
				{
					$this->setValue( $this->aFields['ncHome']->getValue() );
				}
			// Configura el Titulo
				$this->setLabel( "Home" );	
			return true;
		}
	function initializeField( $cField , &$oField )
		{			
			switch ( $cField )
			{
					case 'ncHome':
						$oField->setHidden();
					break;
					case 'cdHome':
						$oField->setLabel('Nombre');
					break;
					case 'nqFilas':
						$oField->setLabel('Cant Filas');
					break;
					case 'nqColumnas':
						$oField->setLabel('Cant Columnas');
					break;
					case 'nWidth':
						$oField->setLabel('Width');
					break;
					case 'nHeight':
						$oField->setLabel('Height');
					break;
					case 'nPadding':
						$oField->setLabel('Padding');
					break;
			}
 		}
	}
?>